#!/bin/sh

set -eu

INSTALL_DIR="$JIAPKG_INSTALL_DIR"
JOBS="$JIAPKG_JOBS"

jiapkg_build() {
	./configure --prefix="$INSTALL_DIR"
	make -j"$JOBS"
}

jiapkg_install() {
	make install
}

case "$1" in
build) jiapkg_build ;;
install) jiapkg_install ;;
esac
